package com.zhongyu.item.provider.apiimpl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhongyu.comm.api.ItemTypeApi;
import com.zhongyu.comm.pojo.ItemType;
import com.zhongyu.item.provider.mapper.ItemTypeMapper;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class ItemTypeApiImpl implements ItemTypeApi {

    @Resource
    private ItemTypeMapper itemTypeMapper;

    @Override
    public List<ItemType> findByKey() {
        QueryWrapper<ItemType> queryWrapper = Wrappers.query();
        queryWrapper.isNotNull("key");
        return itemTypeMapper.selectList(queryWrapper);
    }
}
